<template>
  <div class="main-content">
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :md="10" :sm="12">
            <a-form-item label="消息推送时间">
              <a-range-picker v-model="queryParam.createTime"
                format="YYYY-MM-DD"
                :placeholder="['开始时间', '结束时间']"
                @change="onCreateTimeChange" />
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="8">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>

    <!-- table区域-begin -->
    <div style="margin-top:10px;">
      <a-table
        ref="table"
        size="default"
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        class="j-table-force-nowrap"
        @change="handleTableChange">

      </a-table>
    </div>
  </div>
</template>

<script>
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  export default {
    mixins:[JeecgListMixin],
    data () {
      return {
        // 表头
        columns: [
          {
            title: '序号',
            dataIndex: '',
            key: 'rowIndex',
            // width: 100,
            // align: 'center',
            customRender: (text, record, index) =>
              `${(this.ipagination.current - 1) * this.ipagination.pageSize +
                (index + 1)}` //序号分页后连续
          },
          {
            title:'消息推送时间',
            // align:"center",
            dataIndex: 'createTime',
          },
          {
            title:'推送模块',
            // align:"center",
            dataIndex: 'status_dictText'
          },
          {
            title:'预警推送条数',
            // align:"center",
            dataIndex: 'id'
          },
        ],
        url: {
          list: "/sys/tenant/list",
          delete: "/sys/tenant/delete",
          deleteBatch: "/sys/tenant/deleteBatch"
        },
      }
    },
    methods: {
      onCreateTimeChange(value, dateString) {
      },
    }
  }
</script>

<style lang="less" scoped>
  .title {
    color: rgba(0,0,0,.85);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
  }
  .main-content{
    padding: 24px;
    margin-top:12px;
    background: #fff;
  }
</style>